Clear basket bug fix and initialize refactor