Multiple changes

Added skeleton of a GUI framework;
Fixed some minor bugs