Various fiddlings

Rename functions, use simpler implementations etc