Add some tests, rename test wrappers, remove unused functions