Add SelfLoopsError Exception
add self loop checks; hated removing nice one liners :(
fix pep8
Merge pull request #39 from ankurankan/dev

add self loop checks