Minor code fix and remove un-needed tests.