Implemented the messages.yml file; Cleaned up some code