Adding a utility class, simplifying server code