Major redesign (see last commit) WIP (will not compile)