Fix for Feed adapter crash and code cleanup for Patient adapter