Merge all working code