added doctrine 2 config
various fixes