Fixing JavaScript modularity and some loops
Selection module started