Fixed #45: making server.js more generic