Working on issue #18. Moved history data out of cache, just need to store user data in the database now.
Also made some cosmetic improvements.