Separated REST JSON requests to their own file in the server and rethought layout