Added error handling, some SCText related fixes and some tweaks.