Remove non-functional noise, other small optimizations