Tests.
Made a lot of stuff private.
Tests.