Fix error when getimagesize() fails
Fix typo
Add Optimizer class