Minor bug-fixes and making cip.js node & browser compatible.