saveTable function

Added a better way of saving custom tables