1. Sortable now works.
2. Close now works.
3. some more stuff likre refactoring.

Added riff even though IDK if it will actually be used.