updated docs, class, and fixed some bugs