Fixing some class accessibility issues, pruning dead code