Added Client side TIMEOUT
Removed Timeout and clean up code
Added defenseive programming