Just some refactoring and fine tuning.