Added memoization, some view cleanup