Added basic signature functions.  Rearranged source