Refactoring and fixing test of slots.