Several bugfixes + completed documentation.