Reworked dependencies system + added modules callbacks