Added navigation bar, further refactored code and added legal agreement