Moved all public javascript into call.