Problems with getting functions to return.

Problematic code marked with comments