Fixed all errors and couple of warnings

Sorry for the delay, I'm terrible with git