Cleanup

Cleanup of the code to be more standardized and added the ability to compare principal objects (fixed a memory issue in the event of a failure to load) updated the each iterator parameter name.