Faster loading for installed apps

- Optimized code for faster loading on installed apps. It's still not as
fast as I'd like it to but at least it's something. Based on my tests,
it is approximately 62% faster than before.

If you can get these to load any faster while keeping memory usage to a
minimum, feel free to submit a pull request!