Finish the last two tests and refactor to functions
Unifying function syntax