Fixed DocumentOnDeviceReady() for loading table.
Changed formatting for beeter debugging.