added main() for and integration test, some additional tests for new discovered behaviors