Removing unused code from Desktop and fix some more PMD warnings