Refact and fixes