Refactored Code.

Modified UI for improved appearance.