cleaned up js files, and more work on the spell system