Fixed lots of issues with fetching packages. Added much more logging. Lots of manual testing.