Fixed support define with object arg
Added checks to only operate on "require"
Various fixes