Cleanup, some code reuse
Merge