Fix compile issue and removing classes no longer referenced
Some slight refactoring. Pick up all the available commands.