cleaned up createtables.php, updated code to include comments and type id