Overhaul that whole weird function passing thing