Clean code and add validations