Refactor building logic. Add 'main' field to package.js. Increment version