Refactoring LyX