Restructuring for next release

Tests and general functionality might be broken in the meantime.