Corrected memory allocation, added one setter, changed 2 methods from private to public