Add URL submission

Show activity circle on ajax. Refactor js into multiple files.