Update autowoot.js

Cleaned up code