remove un-used code
change to abstract class
add more dependency
implement for register