One problem I noticed right off the bat was in the first fact: $5 should be $!5 so it does not execute as an alias.