Updated openFile to scroll to the given line

If no line given, it will stay at the top

Rewrite box is now formatted when switched to to ensure it stays
formatted when switching between tabs or opening new notes