Final port of old structure
something renamed
tests fixed