Separate into sections, fix some struct names, remove dead stuff.