Simplifying server script