Expanded javascript to multiple

Expanded functionality by making ajax controller through 3 calls