Refactor a bit to clean up and make reuse a bit easier.