Various tweaks and refactors

No new implementation added