Misc. additions, improvements and cleanup