Merge changes for better directory handling

* Update project settings
* Add missing functions
Add back in #ifdef'd code