Added all the remaining lines, should be optimized later