Reorganize theme template layout

We try to be more consistent across different usecases when compiling
layout templates