Complete overhaul of parser and GUI

And now it should work. A mistake in append function was also corrected.
Memory still needs to be checked, but hopefully there will be less leaks
now.