Improved only-one-instance-function & removed unnecessary files