First pass at adding functions.