SAMIDE-16 Fix code issue in MessagesApi.php and other misc  cosmetics