Built utitlity functions, ensured that all test cases run. Fixed UI for test cases.