changing messages to allow calls from no command line. This can no be used properly as a python module.
various improvements for use in a web service: message types, returning message arrays etc