Started fleshing out some functions.