Indent issues fixed
intial changes complete to allow multiple client types