Organize the dependencies
Some code cleanup