Added function to create all tables.
Added version table and primary version function.
Added variables to store the current version.