Removed dependency on pimple (Fixing #41)

This PR fixes #41 and contains some small refactorings