Moved console generation to js