reworked some files. I still need to implement a single template stack class