Cleanups in the code