implemented submodule search and module name completion.
refactored and added docstrings