Rearrange code once again
Optimize imports and ressources usage