Refactor to prepare for 1.0