optimizations and cleanup
add blending mode