replaced plaint text code generation with generation based on Psi* objects;

fixed imports generation;