Created unit test for subject binder. Fixed various bugs