Improving error handling, fixing JS and implementing URL override