What are the main factors that affect solubility?