WIP Cleaned up comments and added explainations to the file.