Created object literal and removed unnecessary functions