Minor style changes
Further modularization, more work on scripts and bulk API