Cleaned and refactored code. Now Scoped!

Also added error Checking for files that fail to load!