Add simple tests for ASK redirections. Minor code cleanup.