[REFACTOR] Template Class and small changes to the other 3