It depends how much you've taken the engine to bits. The camshaft and the crankshaft are connected by a pair of gears, which have to be correctly synchronised so the valves open & close at the right time relative to the position of the pistons. If you've not touched the timing gears then don't worry, everything should be OK! It's when you remove them you have to make sure they go back in the same position - there is a small mark on each gear which has to be lined up to ensure correct valve timing.
Your problem sounds like ignition timing which is more likely given what you've been doing. The position of the distributor has more than likely been disturbed, it's just a matter of getting everything back together in the right order, and set up correctly.