improve OO (scope of Entityies)
added debug code (message box in Entity)