flags homework

One bit needs refactoring, and I didn't get the form input working yet, but otherwise should be all good.