Added prefix/suffix optimizations