Refactored linclient code.