First workin prototype. Fixed objects initialization, changed sql query
for table creation.