merged core2 back to trunk there might be some errors, wasn't able to test it yet due to some strange g++ and linker behaviour.