Several Changes and bug fixes

small tweeks during the conversation with Anthony.