Updated logic and removed un needed files