refactored useing mdef
Added guard file to aid in development