Refactor, tests
Merge branch 'master' of github.com:kesapojat/tmc-snapshot-api