Adds missing indexes
Replaces Exception raises with StandardError raises