Fixed annoying compiler warnings about unused variables and functions