code cleanup
related to issue #144: eliminate warnings and notice
fixes #208: Add support for CORS to facilitate javascript REST coding