Adde a lot of comments.
Replaced the values class with a globals class.
Implemented the globals.