Cleaned up code and tweaked UX