Move files in /app/scripts and fix references in code