Remove comments and functions at the end of the file