Refactored Template to Master