Major library rewrite
Merge pull request #15 from ragulka/rewrite

Major library rewrite. Fixes current issues and conforms better with node scripting styles.