Fixed some issue brought on by filtering

- Fixed issues relating to filtering and storing the html page or
refreshing notes.
- Fixed filtering not resetting the div class back to normal after being
closed or the input box being empty.