clean up includes, symbolic constants, and unused variables
fix "control reaches end of non-void function" error