some refactoring, new checker module

checker.js as node module to able to write unit tests