Misc. changes and fixes