Cleaned up URL state handling and made a more powerful storage plugin API