Resource functions.