Correcting return values and func declarations.