Added navbar, fixes calculation bugs