going to tidy up this nasty nasty code

added pretty caption, change to packagery