More pruning and refactoring

updating analytics as well