all of cobra core passes pep8

Mostly whitespace or other small changes (i.e. rearranging comprehension
to for loop when unnecessary)