Got rid of magical numbers