html and model refactor, added validations