Compile time warnings

Some compile time warnings occurred. Solutions have been added for these cases, somewhat categorized.