cleanup and remove compiler warnings