Looks like this elsif and the next else can be coalesced in just one else :)