Organization of functions and general polishing.