Some code-cleanup