Tests

This PR increases the unit-tests coverage: http://jenkins.cloud.fedoraproject.org/job/fedocal/449/cobertura/

Which of course lead to a number of bug-fixes :)
Is the strip() needed here?