Fix bug if LPyModel is called from dataflow
Move tests from module to test directory