Threechan bugfixes

Several commits combined, was not able to edit previous commits.