added more unit tests and initial vertical and horizontal layout code