extensive refactoring of the ClojureScript code