Initial fleshing out of functions and comments