99% done for beta

Only needs some changes to logpub.php (I think)