removing the CLI stuff out to a separate file
now accepting incoming piping
now accepts piping, rev version for npm, fixes #2