fixed documentation some code clean up but still work to do