Code reorganisation
Better file size handling