Initializes arrays explicitely
Improves JS code
Improves and reformats JS code
Initializes arrays explicitely
Fixes typo resulting in fatal error
Merge pull request #758 from nsendetzky/master

Initializes arrays explicitely, improves and reformats JS code