cleaned up marker animation code