Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt.