Fixed module dependencies. Fixed python code emitting.