Cleaned out some code and also enabled javascript validation.