Fixed some unit tests and enhancements (not working)