Separate the recent_entries subroutine into allowed & denied.
Refactor the above subroutines to show the variables used immediately.
Remove superfluous parentheses at the end of subroutine calls.