Moved key functions and added types in serf/key.go