Source analysis magic

Cleaned up some projects with source analysis. Manually reviewed and changed most of the things.