Can no longer add components multiple times, add tests for ComponentContainer

Close #446.