Encapsulated application location determination

This has been moved into a function to make the code easier to follow
and to allow re-use.
Encapsulated skills table generation

Skills table generation has been moved to its own function. This should
make it a lot easier to generate skills tables in multiple locations in
the future.
Merge pull request #19 from zellfaze/appLocationEncaps

App location encaps