cleaning up the code to remove unnecessary pieces.