Refactor to be 1.9 friendly