Minor refactoring. Pushing the rest code