Finalising of code towards cleanup.