Update gen5.1.js

Needs fixed a bit, methinks.