Added teplate file and included last fixes