add package.json, update .gitignore
Port states plugin over. Expose library & plugin pattern. Unit tests for each.