Removed the compiler warnings
cleaning up the code