Fix code formatting issues

80 columns limit preferably
spaces after if/for/while
KNF code styling