Added body to functions and switch statement