Split into more views, clean up and optimizations