reformatted for better readability
added some test cases and gave a side-by-side comparison
removed awful ajax in script/style loader