Added shortcuts to history and training to profile and back and fixed undefined index bugs