Code Cleanup and Add Support for ImageField