Finally have it working pretty well