Changing way encodings are handled, various syntax tweaks