Cleaned up handler creating functions.