removed totals logic from partial view and created library