Misc updates and bug fixes