Image validation fixed. Submit button fixed. Restructured code