Refactor UEFI graphics code and move example to example.f