Rewrote config memory allocation