MA-1084 #time 20m functionally tested and fixed minor issues.