Work on tidying up the code
Added doctools for svg and lyx files