[#6] Removed useless code.
[#19] Replaced some string concatenation by creating a list of strings.
[#6] Fixed strange counting code.