Clean up code and add some explanation in comments

Conflicts:
	src/libtomahawk/utils/TomahawkUtils.cpp