refactor snake code. begin adding support for apples.