Some refactor and get cljx to work