Fixed for latest version. Bug fixes. Slightly modified mod API.