Some new features and fixes