Code cleanup, removal of compiler warnings