Reworked 98% of the logic for ACM - better doc-blocks & many other updates

Rewrote the JS file for clarity. Clearer function names, better processing logic, doc-blocks, avoided jQuery for sizzle lookups so should perform much faster there. This needs to be tested in IE.