clean up and some initial unit tests
update register method callback to support closures and set type hint to callable
additional tests for common config and model