Adding in some initial support functions, more functional tests