major layout refactor