Cleaned code

Removed/edited all code that produced warnings.