Tidy view code and extract todos and items into partials