Initial commit.
Add tests for main part.