Updating sizes and position
Fixing leak
passing settings to scan