Initial commit; half done.

8 functions passing tests.