Cleaned up global functions replaced by express.js