Cleanup

Cleaned up the code a bit.  Also fixed bulkParams() so that it doesn't clear params