Improvements sharing usefull code betweeb client and server