Modified to handle calls from browser

Signed-off-by: Daniel Koo <danieljamin.koo@gmail.com>