Code cleanup

1. Remove unused code
2. Comment on dep functionality