refactored heavily for cleanup, tighter js sdk integration & basic bootstrap