Updated cdn scripts to local for offline dev. Updated script to allow some simple callbacks. restructured some parts