add class wrapper and clean test codes

format code
encapsulate data holder classes

format codes
move test and run codes here