Added functions to change memory element type.