Implemented a more flexible method for wall kicks