Table prefix support

Hello, can you check now. 
Only 28 line changes