Cleanup around handlers for use in edx-platform