Finally got most stuff working smoothly. Still have to work on automatic targeting.