Code cleanup and warnings suppress