Removed unstable memory inefficient code.