Fix unassigned variable error + Error classes fix.