Minor fixes to how internal interfaces are loaded.
Cleaned up code.
More minor cleanup.
Merge pull request #231 from axsh/fix-internal-interfaces

Fix internal interfaces