Misc additions and fixes