This patch splits the implementation of the window layouter into several headers to ease the upcoming addition of new functionality.