added interface_exists check to make sure interfaces can be replaced too
added more explicative exception string
modified body replacement to allow for interface replacement
Merge branch 'hotfix/class-exists'