Layout weights cleanup
Making sure server is disconnected before starting a new one
Small refactorings in validator logic