Refactor to remove hardcoded values