Cleanup/preparation for GUI