Remove newtype enums and bare functions

r? @brson