Lots of bugfixes.

Got the pickup detection to actually work in a reasonable manner.
It also seems that having the web application in debug mode
causes these random freezes of just that process, I have no idea
why. It seems to freeze blocking for I/O, because the CPU usage
doesn't change.