Updated serve function to use Slim