code refactor and created motion operation classes