Various addons, fixes and improvements in the existing code.