After trying different throttle and choke positions I was able to start it for about 20 seconds but it doesn't idle on its own. I have to keep revving it up to about 1/3 or 1/2 throttle for it to keep running.

The trimmer head keeps rotating at all times even at low idle and I wonder if that's the reason why it can't idle? Maybe it's offering resistance to the engine? I couldn't have messed it up because when I disassembled the engine I never took out the crankshaft, clutch or anything (the furthest I went was to take out the piston and gudgeon pin). I now remember that even before I overhauled the engine it had the exact same problem. The head rotated at all times, even when pulling the start cord and it was very difficult to start. This is why I disassembled the engine on the first place- to find out what it was...