Clean up and comment code
Add test for inner deps