Made some changes to codeblocks and therefore my code.