reorganized public js; added GNU license
sexier looking function headers