Removed templates, organized code and added default constructor