Subroutines for vertical movement logic complete