Initial upload

Initial upload of code including tests.