Javascript Cleanup

Cleaned up Javascript errors (for double instantiation of map object),
and moved all inline JS logic to custom-cfa.js file