Added animation and fixed bugs