merge and cleanup of a few helpers
Merge