Added alternate functions

Moved things around and added alternate functions (those described in
the doc).