Load files the right way

Basic things like using the appropriate API function for URL/URIs and pathes. Else WP can't filter them properly. (Avoid using constants!).

For the rest the commit messages should do it. Of course this is just a starting point. Everything called from or in global scope should be avoided.