Revert "General refactoring"

This reverts commit 5a97b66cc876a4cbab6585e3a7339f721fa71edb.