simplify toString methods
remove useless code
handling 'require'