Refactoring of Objects.js