script.js: refactor, added Layer
	modified:   script.js: added Layer, removed attachHandlers,
	animOpacity, added Main