- clean-up the source code - remove any code not needed anymore - proper and consistent indentation (ptop ???) - remove unused variables - remove unused units - add comments where needed - remove typecasts if not needed - split lines for better readability - resolve compilation warnings