ported non-refactored code from startup and fixed images