Setting up multiple package dirs/Fixing misc rewrite issues