Code cleanup and warnings suppresion