It's actually been a while since I made a module by myself. For the secret door, you could try making the distance 10 or 15 instead of 5 (giving the spotter an earlier chance to notice). I can't recall exactly the answers to your other questions, but you should definitely check out
http://nwvault.ign.com if you want to learn more. Also for commands, (like EndModule) go to
http://www.reapers.org/nwn/reference/