refining view front-ends, especially drop-down menu. refactored javascript to live in templates