Moved data manipulation to helper class