Addressed a few warnings and errors