Finished layout and refactored tests