Added initial working code and test suite