Cleaned GUI code a little bit