Pull request with my latest changes. Some memory leaks fixed and some html and enml.

Its my first pull request, so it might be wierd some places, especially beacuse of Makefile and .pro file. Tried to make it smoother.