refactor to be easier loading inside symfony app as bundle