Implemented Main Template