Improved table parsing