less memory usage + bugfixes