Code massacre

This is built on top of #49. I have removed from core.py all the XML strings which will not be needed if #49 is committed, and replaced them with calls to the new services code. Core is now about 500 lines shorter (and hopefully easier to read). Fixed a few bugs along the way.

All functions seem to work OK on my system, but would appreciate testing/feedback.

Lawrence