Thrust remake merge

Complete makeover using thrust, more generalizable for other models