Fixed lots of bugs. Table toubling actually is working from a simple glance. Time for testing