Removed and readded tables after rewriting functions