clean up
added some more documentation of base api functions