Implemented Table simulator, fixed bugs