Improved structure with factory pattern

Now have scripts to access different tasks. e.g. creating a table, and
solving a hash.