Initial commit of optimized view logic