Remove unnecessary codes and refactor in object-handler