Added "ended" method
Fixed JShint error
Merge pull request #199 from dirkjanm/master

Added "ended" method