Fixed various errors which stopped the frontend from working
Renamed "valid" to "redeemed" (easier to understand)