Tweaks in detail transition and refactor