In my experience, I have found that I needed to take a step back and focus on a solid foundation of technical knowledge that is totally language independent. After that, you can go back in and layer in how different languages might help/hinder you in particular situations.
Much of my education was from a "get cool shit done" perspective, and I did. I had solid projects in an array (no pun intended) of languages but lacked some of the true, lower-level knowledge as a foundation.
Your mileage may vary, of course, but if I could start my CS education over again, that would be my advice to... myself..
I inherited a similar beast at my last startup. The company ended up going under before I could fully untangle the mess, but when I was researching, I found little out there to give me good advice. All of our HTML, CSS, and JS needed to be addressed and we were on a 2-week release cycle, so I found breaking this debt work into release-size chunks to be a real challenge and still am without a real solution for.
I'd be interested in hearing your approaches to your current project and would definitely be willing to give whatever advice I can based on what I found through trial and error.