Refactor input directive, write tests