Removed accidental nested functions