SPOT-551: Cleaned up code and removed a console.log statement