auto-rotate jpegs if the rotation flag is set
also allow manual rotation of the thumbnail and resized versions
cleanup misnamed function
cleanup makePath function
cleanup item delete functions
remove unused code and db tables for external site items
whitespace and {} changes