Added lots of GUI features and fixed some error checking