Refactor the code for better naming of data types and functions.
Delete swap files.