Bugfixes – cleared all memory leaks

free( … ) in the necessary places! When you run the program on
valgrind, you might encounter some direct and indirect memory leaks.
These are just the lines pointer not being taken into account.