cleaning up permalinks.js and removing unused packages