Added base component and error detection. This fixes #8