Avoid use of C++ keyword as variable name
Use MALLOC wrapper in 2d code
Apply strict type checks to drawer functions