Switched to database with relationships