Filter Added to modules

Filter function added to modules and to the debug messages.
Separated the services functions into another file
Fixed bug with start and stop modules.