add tests
fix multiple calls to ready();
refactor to remove ready variable

can just use the listeners list as a flag
Merge pull request #1 from defunctzombie/master

add tests