moving init code to code editor module