Flash/ActionScript3 version mostly working now!

Various cleanup to JS code as well.
stick some more headers on things
Clean up a little
updates to readme for flash goodies