Move some of the slot code out from the header.

Well, the more code is compiled once the better. Invocation mechanics
will be moved out too, as well as type modifiders (optional, etc).