Once again: clean up, small optimizations