 ;; Load org-mode
 ;; Requires org-mode v8.x
 
-;; Uncomment these lines and change the path to your org source to
-;; add use it.
-;; (let* ((org-lisp-dir "~/.emacs.d/src/org/lisp"))
-;;   (when (file-directory-p org-lisp-dir)
-;;       (add-to-list 'load-path org-lisp-dir)
-;;       (require 'org)))
+(require 'package)
+(setq package-load-list '((htmlize t)))
+(package-initialize)
 
+(require 'org)
 (require 'ox-html)
 
-;;; Custom configuration for the export. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Custom configuration for the export.
 
 ;;; Add any custom configuration that you would like to 'conf.el'.
-(setq
- nikola-use-pygments t
- org-export-with-toc nil
- org-export-with-section-numbers nil
- org-startup-folded 'showeverything)
+(setq nikola-use-pygments t
+      org-export-with-toc nil
+      org-export-with-section-numbers nil
+      org-startup-folded 'showeverything)
 
 ;; Load additional configuration from conf.el
 (let ((conf (expand-file-name "conf.el" (file-name-directory load-file-name))))
   (if (file-exists-p conf)
       (load-file conf)))
 
-;;; Macros ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Macros
 
 ;; Load Nikola macros
 (setq nikola-macro-templates

           (expand-file-name "macros.org" (file-name-directory load-file-name)))
        (org-macro--collect-macros)))


;;; Code highlighting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun org-html-decode-plain-text (text)
       "Convert HTML character to plain TEXT. i.e. do the inversion of
     `org-html-encode-plain-text`. Possible conversions are set in
     `org-html-protect-char-alist'."
       (mapc
        (lambda (pair)
          (setq text (replace-regexp-in-string (cdr pair) (car pair) text t t)))
        (reverse org-html-protect-char-alist))
       text)

;; Use pygments highlighting for code
(defun pygmentize (lang code)

    ("sh" . "sh")
    ("sql" . "sql")
    ("sqlite" . "sqlite3")
    ("tcl" . "tcl"))
  "Alist between org-babel languages and Pygments lexers.
lang is downcased before assoc, so use lowercase to describe language available.
See: http://orgmode.org/worg/org-contrib/babel/languages.html and
http://pygments.org/docs/lexers/ for adding new languages to the mapping.")

;; Override the html export function to use pygments
(defun org-html-src-block (src-block contents info)
