updated tests; some fixes and enhancements