cleaned up parsing and gui generation
cleaned up code and added headers