adding license, refactoring serverjs