revisions, optimizations, added help docs