Attempt at clean architecture