implement RuleBook API, add a simple test, refactor and cleanup create_mk.coffee