unit test added, minor changes

detail ctrl unit test added,
main ctrl unit tests clean up