Major refactoring - PMD & Trove

Changed some things PMD pointed at, moved many collections to Trove
collections.