refactoring of some methods
Updated docs, minor bugfixes