Fixed spelling
Fixed rotated image problem, small image problem and tidied code