separated the container from the configuration

added comments
did some cleanup
simplified

removed strict/loose configuration modes
removed obsolete exceptions
addes a missing test