Ported over some basic layout stuff