General cleanup, bugfix, ready for anon users.