added more code comments; made require and define directly public.