Refactor database tables init; make 2.x import script