added some stuff to snake.js/refactored/fixed enlarge algorithm