Fleshed out layout and refactored tests