Code cleanup and optimizations

- Removed double doctrine initialization
- Changed the default cache to array
- Using the composer autoload