Refactor code to use aliases