miscellaneous refactoring * moved refresh operation to new endpoint * extracted handler duplication into shared objects * added dirty indicator check on refresh