Changed all source files into node.js modules
Docs rewritten to modules
Build script 'dist' created
Created shared module math.js for all functions (resolves circular references)
Fixed Selector initialization
A little restructuring