Refactored handleParameters function in chidley.go