Fix response sending when init() fails; create config.lua to contain global configuration; improve API function resolution; improve API code structure.