[WIP] Tentatively refactoring

shouldn't have been committed