Moved some tests to integration tests in core,
fixed some random test problems