Moved loading of scripts to wp_enqueue_script instead of wp_head. Reading caption instead of page title for description on gallery.