refactored and commented key signals