Some useful stuff for ajaxy action.