ManagedBean code refactored