Code fixes for list operations and various fixes to data processing