Image size optimization

Signed-off-by: DanielDimitrov <dimitrov.dan@gmail.com>
Several changes

Signed-off-by: DanielDimitrov <dimitrov.dan@gmail.com>