small refactor for web resource framework