complete missing close/free_result, split table css to external folder