First cut on function prototypes - not really finished