cleaned up code and edited gui