fixed state system, commented things, generated more documents, cleaned up classes and changed some packages