I think I found the cause for my check engine light (P0170). I had previously replaced the MAS and reset the fuel trim and the check engine light still came up with the same code scanned. Yesterday, my car had a very irratic idle when stopped at a light. The car was shaking badly with idle fluctuate between 300-700 rpm and it seems lilke it's going to stall. I took it to an independent mechanic and I watched as he diagnose the problem. After inspecting the car, he decided to spray some carburetor cleaner on the intake manifold. As soon as he spray around the intake manifold, the idle smoothes out and he determined that there's a leak. We soon discoverred that a flap on the manifold broke loose (I am not sure what the part is called). I think the flap opens/closes to adjust the air flow into the intake. As soon as it is replaced, the car idles and drives perfectly.
As I inspect the broken part, I was amazed at how flimsy the part was made. The flap and the surrounding pieces are made of plastic and does not look robust at all.
Hopefully this ends my check engine light saga. Thank you all for the help.