Fixed variable DUP declaration.
Added tests for base component for phases detection and protection.