Clean up comments and add validation