Reorg

@davideaster would you mind reviewing?