refactor: general fixes