Removing bloat and unused code