Some database optimization and added a new function to be able to set head tags and get them.