Removed a debug line
Made function codes public, for use in application callbacks
made the callbacks notifications; the mapping is used regardless of what callback happens.