Component refactoring for issue #42