adding image resize to functions, tidying up front page