Simple optimization of base implementation. Add template for bitimage optimization