pub fn order(tables: Vec<Table>) -> Vec<Table>
Tries to sort the tables in order to avoid problems with dependencies.