Fixed some bugs, updated test, added a new component test