Core testing and bugfixing