refactored resources javascript, using mustache to render popups and table