Divided MW code into 2 layers, Added SelectionLayer