improved database stuff and clicking a time actually does something now