Added replacement policy and insert. Seg fault at return in main