Changed to return string in functions rather than directly print it.
Added generic function argument stubs to take care of AAPCS.