Remove dumb if. Cleaned spaces. Abstracted anon function.