changed memory design, fixed two parsing bugs