Refractored constants and changed modid.