Fixed object checking and remove jQuery dependencies