Cleaned up the code, removing old code that was commented out and fixed some spacing.