Bug Fixes, Improvements

More tests