Refactor a lot
Fix previous