Homepage: adding validation and code formating