Update SmartServer

Refactorize.