Updated interface for modehandler
Merged in ben's code