Just switch to another idea. Implement it quickly. Observe the reactions and make a new plan. You need to iterate the ideas. Rewriting is a mistake. Of course you can implement it much better but the risk will be double next time. There are dozens of new ideas.