Flag sources 4

Hey @garrettr this is the last commit for the flag sources for functionality. There is some clean up that I'd like to do, but I'll let you catch up on merging stuff before I make any more pull requests. Also if you shoot me an email or let me know after you merge in the better ui I can manually merge that stuff before you merge this commit. Let me know what you think.