Fixed everything to work with Sergio's structure