move "entities" out to main lib dir
refactor PatternUtil into static methods on Pattern
remove util.js
mastering async tests