added more detailed comments and ui touch-ups