Revert "Some refactoring"

This reverts commit acbc3da2965eaaec70763c5c86d7eb292126d20f.