Fixed various issues and expanded features