Reorganize content_directory.
Change sql select queries to prepared statements.