Interim commit.  Fleshed out some functions