[z2391] Fix duplicate entry issue added in [z2381]

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [12530] - f9573a0)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s2042] - 194445a)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2392] Cody Style Improvements

Also remove an unused variable (thanks to Den for this!)

(based on commit [12532] - b1f227c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s2044] - 60df866)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>