modularizing layout templates