Code refactored - common functions are in single code file. Client has
 own function