extend all objects with options, added Mocha tests