* check for null first! (avoid crash if no layer is specified)
* `graphic` instead of `graphics` for <sprite graphic="foo.png">
Merge pull request #115 from AndreiRegiani/dev

Minor fixes