added support for macos, implemented remove from filesystem, optimized gallery view render