code cleanup

Also separated the test vectors.