Creating my own dependency injection system