Improved functions.