Instead of restarting the server every now and then, use function Unload_Scripts (
http://docs.polserver.com/pol097/singlefunc.php?funcname=Unload_Scripts&xmlfile=osem.xml). And if possible (should be!), do test your work on a private server before turning it public - that's of course up to you to decide, but if I'd be a player I'd appreciate it.
If you have a serial of the object you want to work with, don't bother enumerating all the characters, mobiles or items - just use SystemFindObjectBySerial (
http://docs.polserver.com/pol097/singlefunc.php?funcname=SystemFindObjectBySerial&xmlfile=uoem.xml) with required flags - it's clean, it's fast, it's the way to go. If only you are using modern POL, say, 092 or newer.
NPC's have this member master and a method SetMaster. With those you can get rid of the cprop-based system and make your scripts even neatier.
As a summary, I'd suggest you to read through all the existing documentations (
http://docs.polserver.com/ - pick your version) - you might learn a useful trick or two!