added some docs and base cleanup