Small refactors from Oct 2013

Signed-off-by: Danny Price <dan@thetelegraphic.com>