Removed a faulty character i shoppingCartFactory.
Moved a var declaration to outside its try-block.