Fixes task 4 long lines and C++ look alike code. Adds some style changes and some new functions.