- unused arguments - shaddowed vars - var redeclarations - some whitespace involved in above lines
- use same whitespace style throughout and fix some indents. - change from minetest. to core. namespace.