Added task input validation, removed compact hack