small improvements

a small refactor to the methods generator and use logger instead of print.