Added some functionality to the UI class