Commented out the ugly foo function that causes problems with scope