Revert "Finished new prefix management"

This reverts commit 43da08df12aea9310ec7cb2c4cb76d51207c7920.

The new code was having some issues.