Manually combined the code, needs alot of changing thoughi: