Merge pull request #23 from Metaswitch/plw

Please can we take this lot - various bug fixes and code tidies.
Merge pull request #25 from Metaswitch/plw

More minor changes and code tidy up
Fix up dull typo in IP removal code.