Adding server + client timeout feature

Closes #360
Closes #359