[WIP] moving javascript for table initialization to see if performance increases