added a all script to examples
refactored some classes, grouped methods into modules
refactored some classes, grouped methods into modules