I've come across a few comments that some parts of Monero's code is a mess because it has never been refactored over the years. Someone mentioned part of Monero's weaknesses that were revealed during the attack, stem from the Cryptonight code implementation and that the messy code makes it hard to fix.
I'm not a coder myself, though I have a general good understanding of IT and software development.
I'm wondering how important refactoring the code is. Is anyone from the dev community planning on doing it?