Refactor / cleanup
Further refactor
fix filter was always initialized to 'all'

even if the URL hash was like #/completed
Refactor: use forEach