prepare pull request #26 to be merged with updated codebase

Pull request #26 makes sense to me, too, and the non-hidden-image tests still work. I updated to merge with the new javascript codebase.