Tool Shelf Property Setting Problem

I’m building a pyramid generation script designed to work off parameter settings in the tool shelf. It’s not working. The tool shelf shows up initially when the mesh gets added but the moment I try to change a parameter, it just vanishes and does nothing to adjust the new object I created.

Does using bpy.ops make my script incompatible with property settings in the tool shelf?

Here’s the code:
http://pastebin.com/m4ddf85ed