Initial commit for client helper; some code cleanup