added list of modules
added test for append_pymodules_if_needed()
more docstrings