More refactoring done and started working on the snakes tail