previews optimized, debug values, template fix