some fixes and adding tests to core
more fixes and tests
added forgotten tests
IGNORE FILES CREATED BY THE tests
Added tests and fixes.
a few fixes