Extensive update, reorganizing package

Lots of updates, probably the last unordered commit.