refactor of lib/module, and add logger module