Add Cast-related API methods.
Use sequelize to handle the db layer.
Also add some convenience debug functions.