Added preliminary unit tests (closes #21).