Cleaned up the code slightly in prepreation for the great swipe functios