Refactoring/fine tuning.