Hopefully fixed bug #1? Can't test without server. Also removed unneeded imports.