Removed unused includes. Changed std::max for fmaxf.