Removed a lot of unnecessary console.log() calls; will readd debugging in a more useful form later