Issue# 58: Better memory handling