Refactor

A few changes to help out.