Added Module pattern implementation. Tests updated