Moved things around for better use as submodule
Tabs to spaces
PSR-2 changes
Fix for User Agent not always being available (for example via command line)