Static key config now working 

Moved tls-server stuff together within the corresponding if . .