Changed some things in an attempt to conserve memory.