Make some slight optimizations