SS: Added api endpoints and js structure