lots of stuff, added stress tests and optimized a few bits. Added logg lib