Update Template for testing and fixed bugs