Implement open file menu
Fix TeX formula regex
More removals and refactoring (format and sort)