More tweaks. Added configuration options.