analytics and cleaning up layouts