Reorganised some code. Preparation for image upload & manipulation