Made the addStr into templates, added the code for the write functions
Removed debug hack