I hope you would have a success with Brown..
...but if not:
You profile is decent enough for those schools, but you should know that recommendations are extremely important (you don't seem happy with yours...)
Speaking about MIT and CMU, it takes an excellent profile, a bit of luck, and research, research & research experience to get there; and even that might not be enough... so don't be too disappointed about them.
Brown and UPenn are good schools, but you should have applied to more than 4 schools; i.e. severeal dreams schools (hard to get in), many likely-to-get-in schools, and a few easy-to-get-in schools...
If you are going to reapply, you should apply to more top 5-20 schools. Some of they are absolutely great schools with top profs and so on (even though there are not mit/cmu/berkeley/stanford).
There is NO need to retake GRE / Toefl; you should consider taking GRE Computer Science test, though.
In summary, continue your research, write a couple of papers if possible, improve your recs, and reapply.