Fixed bug with the AJAX URL.
More refactoring (constants extracted).
Cleanup (dropped inner layer - not needed).