Move this to constructor and free data in destructor