Fixed memory leaks problems.

I didn't delete the views. So I've created a funcion inside router that deletes the views before initializate.