redesign lua interface (separate from core, add locking ...)