Fixed an issue with url relative path that caused ajax call to fail.
Also extracted IndexController with index page and fixed maven build.