First commit, includes all methods and some tests.