fixes #14. Plus some cleanup of console.logs()