Removing self invoking function from server side