Clean up and fixes
added docs