Refactor code and data calls, provide alias parsing function