Lots of fixes, added NanoLogger