Added more comments to Code/GUI and cleaned up code (PEP8 compatible)