refactored error handling
reafactoring of some debug code
bugfix with wrong syntax
bugfix
refactoring of method setUserModel