added Template method example and other minor changes