Added classes to deal with memory size