add cookie library and move plugin order functions to plugins object
change variable names to correct for accidental overwrite
added sorting of plugins accoring to saved location