do some model refactoring
more unittests and some modifications for it
add documentaiton for MySQL configuration -set_mode-