added application layout stuff and accompanying tests