Refactor ImageStack's signals and slots