full refactoring; splitter support added