Erasing traces and minor bugfixes