aaand... yet another major refactoring