Changed from classes to struct + fns