removing self references from server side code