fixed bug with not compiling files
updated for publishing to npm