Cleanup + start of code to do real mass scans