Added documentation to code, fixed GUI