Added a function to search for a specific module. It simplifies a lot of code. It fixes #12