add xterm-256color function
refactoring for npm publish
restyle and refactor code somewhat