pmd and firebugs refactor