Mostly table, some refacturings