remove phase and refactor motion close_at

fixes #569