Misc additions and some general cleanup