Power conditioning and protection