Added Lua filter implementation and some bugfixing.