Make log tab use square calendar
Add some sql stuff
Add basic history log system