Refactor brush tip movement into a separate object