Moved validations and formatting in utils