added masonry, code cleanup