Fix stuff, and add console logging