Implemented dynamic element rendering and removing based on active position.