unify js handling
add pattern and entities
add simple serialization
simple persistence works