Refactorings, flash error integration