Cleaned up UI code with partials