Fixed output

Yeah!
Also fixed memory initialization.