Implemented some history functions to make things more organized