Refactor view transitioner

Move helper functions to file top level
Don't reuse layers in view transitioner