Removed use of _Generic and P99 (thank god)