Code refactoring, adding signals to castle