Compile time warnings

Some compile time warnings occurred. Solutions have been added for these cases, somewhat categorized. 
@ScottDugas, was this the only method providing what we wanted?