UI work and and cleanup of existing code