Implemented history functionality in gui. Fixes #21.