Added a load of UI classes and bug fixes