Added improved GUI functionality

Added improved GUI functionality and refactored UI init