updated explanations, some bugfixes and cleanup