Clean up animation code by using absolute positioning