A rewrite of the timemap, some bugfixes

Note that the timemap isn't bugfree. It works fairly well, but it's not
quite perfect. There seems to be an issue sometimes where an area is
filled in twice, I've yet to determine why.