Changes to app loading to make it more robust and cleaner code.

Still needs more clean up but it is a bit better

Also tested that all app names works (with and without .yaml, and absolute and relative file paths)