code cleanup and removed replace task