Refactored some classes, added the GetBedList response, error handling, ...

...and general prettying of the code.