Template Class fixed and some updates