Fix issue #23
Some refactor
Fix some bug when getting modules instances or models classes