Moves the assert macro and adds another function for loading the proper image based on device type.