Move static variables into defines