added navbar and changed code structure a bit