Added various things and tests.