Cleanup and optimization
Now addes points to database while downloading from device