Converted many array_pad() calls to array_fill() calls
Merge branch 'master' into speed
Fixed shadow attack logic
Tidied up code
Fixed code to work with PHP 5.3