Tweak MemorySize to stop code climate complaining

[#51559097]
Remove duplicate code in pre 8 and post 8 heuristics

[#51559097]
Merge 51559097- to master

[#51559097]