Misc. fixes and additions