Various bugfixes and expanded BCL support