Clean up the code with the adapter moving