Make error accept state as first argument
Add special case tests
Add content to index template for loader