Some refactoring.
Fixed navigation links.
Added current revision link to template footer.