Solved by AlconDivino in post #2 
              
              
                I did find my problem. It was a rather unspectacular error. 
i forgot registering my layers with register_module(). When adding them i got the expected results