Make pending count dynamic
Revise routing and templates