Using new features from fog-core to fix build on 1.8.7 and improve code
Merge pull request #23 from fog/using_new_features

Using new features of fog-core