finished the functionality for the sliding cart, refactored the code a bit.