Replacing _.clone with extend, removing underscore.js as dependency