structuring distapcher js

by moving list of handlers for every page to hash