Allow custom blend modes

This change also simplifies the current blend mode implementation.