big restructure, things were getting unreadable