Lots of cleanups, and return T: Float from noise functions

You can't do this, because the return value of `func` is of type `T`. We can't overload `as` right now.