added some tests and defined more stringent interfaces in the submodules