Refactoring and tweaking,