Refactor koc.js in separate files in /lib, fixed #34