Refactored optimizer (compile different opimizer passes separately, instead of including *.c file)