Added code to handle multiple image sizes, validation and test