Moved 'midline' state to local variables, doesn't need to be kept at the clas level