added models

refactored code
added dartabase core lib used by all dartabase tools